package com.mioto.ld.communication.mqtt.protocol.model.device;

import com.mioto.ld.communication.mqtt.protocol.model.Payload;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Date;

/**
 * @author mioto-qinxj
 * @date 2024/5/7
 * @desc 设备故障上报/故障恢复上报
 * <div>
 * 因为上报时间取服务器时间，所有忽略协议上定义的reportTime字段
 * </div>
 */
@Getter
@ToString
public class DeviceFaultReportPayload extends Payload {
    /**
     * 故障产生时间戳
     */
    private Date reportDate = new Date();

    /**
     * 故障列表
     */
    private Integer[] faults;


    public void setFaults(Integer[] faults) {
        this.faults = faults;
    }
}
